package com.j283_5.wisdom_park.controller;


import com.j283_5.wisdom_park.common.result.ResultData;
import com.j283_5.wisdom_park.service.LoginService;
import com.j283_5.wisdom_park.vo.login_management.LoginVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * <p>
 * 登录表 前端控制器
 * </p>
 *
 * @author laoda
 * @since 2022-04-28
 */
@RestController
@RequestMapping("/login")
@Api(value="登录管理",tags ="登录管理",produces="yrr")
public class LoginController {
    @Resource
    private LoginService loginService;


    /**
     * 登录。
     * @param loginVo
     * @return
     */
    @RequestMapping(value = "/login", method = RequestMethod.GET)
    @ApiOperation(value = "登录管理", notes = "登录管理", produces = "yrr", response = ResultData.class)
    public ResultData login(LoginVo loginVo) {
        Map<String, Object> login = loginService.loginselect(loginVo);
        return ResultData.ok().data(login);
    }

}
